package com.bruce.pattern.behavioral.memento;

import java.util.Stack;

/**
 * Created by bruce on 2018/11/10 21:27
 */
public class ArticleMementoManager {

    private final Stack<ArticleMemento> articleMementos = new Stack<>();

    public ArticleMemento get() {
        return articleMementos.pop();
    }

    public ArticleMemento add(ArticleMemento memento) {
        return articleMementos.push(memento);
    }


}
